package com.app.micaihu.configure

import androidx.collection.ArrayMap
import com.app.http.bean.BaseBean
import com.app.micaihu.bean.game.GameCenterEntity
import com.app.micaihu.bean.game.GameContent
import com.app.micaihu.bean.game.GameDownloadEntity
import com.app.micaihu.bean.infor.AttentionAndFansBean
import com.app.micaihu.bean.infor.AttentionStautsBean
import com.app.micaihu.bean.infor.UploadFileResult
import com.app.micaihu.bean.infor.UserInfor
import com.app.micaihu.bean.news.ShareBean
import com.app.micaihu.bean.news.VideoList
import com.app.micaihu.view.bean.*
import io.reactivex.rxjava3.core.Observable
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * 接口请求  表单提交
 */
interface ApiService {

    @FormUrlEncoded
    @POST("/user/quickLogin")
    fun quickLogin(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<UserInfor?>?>

    @FormUrlEncoded
    @POST("/user/boundThirdUser")
    fun boundThirdUser(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<UserInfor?>?>

    @FormUrlEncoded
    @POST("/user/flashlogin")
    fun flashLogin(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<UserInfor?>?>

    @FormUrlEncoded
    @POST("/user/captchaLogin")
    fun captchaLogin(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<UserInfor?>?>

    @FormUrlEncoded
    @POST("/user/login")
    fun login(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<UserInfor?>?>

    @FormUrlEncoded
    @POST("/user/weiLogin")
    fun weiLogin(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<UserInfor?>?>

    @FormUrlEncoded
    @POST("/user/sendCode")
    fun sendCode(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    @FormUrlEncoded
    @POST("/user/checkMobile")
    fun checkMobile(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    @FormUrlEncoded
    @POST("/user/changePassword")
    fun changePassword(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    @FormUrlEncoded
    @POST("/user/boundMobile")
    fun boundMobile(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<AccountConflict?>?>

    @FormUrlEncoded
    @POST("/user/flashBoundMobile")
    fun flashBoundMobile(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<AccountConflict?>?>

    @FormUrlEncoded
    @POST("/user/setMainUser")
    fun setMainUser(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<UserInfor?>?>

    @FormUrlEncoded
    @POST("/sys/arms")
    fun arms(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Arms?>?>

    //视频列表
    @FormUrlEncoded
    @POST("/video/videoColumn")
    fun videoColumn(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<VideoList?>?>

    //问答列表
    @FormUrlEncoded
    @POST("/topic/cmtList")
    fun cmtList(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<QuestionList?>?>

    //知识列表
    @FormUrlEncoded
    @POST("/video/knowledge")
    fun knowledge(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<VideoList?>?>

    //视频列表
    @FormUrlEncoded
    @POST("/news/exclusives")
    fun exclusives(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<VideoList?>?>

    //要闻列表
    @FormUrlEncoded
    @POST("/news/topNewsDate")
    fun topNews(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<List<TopNewsGroup>?>?>

    //上传图片
    @POST("/user/upFile")
    fun uploadImg(@Body params: RequestBody?): Observable<BaseBean<UploadFileResult?>?>

    //未加入军团列表
    @FormUrlEncoded
    @POST("/army/list")
    fun armyList(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyList?>?>

    //加入军团
    @FormUrlEncoded
    @POST("/army/join")
    fun join(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    //军团 详情
    @FormUrlEncoded
    @POST("/army/detail")
    fun armyDetail(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyDetail?>?>

    //加入成员列表军团
    @FormUrlEncoded
    @POST("/army/armyGroupMemberList")
    fun armyGroupMemberList(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyMember?>?>

    //关注
    @FormUrlEncoded
    @POST("/my/follow")
    fun follow(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<AttentionStautsBean?>?>

    //关注和粉丝列表
    @FormUrlEncoded
    @POST("/my/myAttention")
    fun followList(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<List<AttentionAndFansBean>?>?>


    //删除成员/退出军团
    @FormUrlEncoded
    @POST("/army/deleteMember")
    fun deleteMember(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    //邀请加入军团
    @FormUrlEncoded
    @POST("/army/invite")
    fun armyInvite(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    //军团关注列表
    @FormUrlEncoded
    @POST("/topic/armyAttention")
    fun armyAttention(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<QuestionList?>?>

    //出操
    @FormUrlEncoded
    @POST("/army/signIn")
    fun armySignIn(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmySign?>?>

    //军团消息列表
    @FormUrlEncoded
    @POST("/army/msgList")
    fun armyMessageList(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<List<ArmyMessage>?>?>

    //审批操作
    @FormUrlEncoded
    @POST("/army/auditing")
    fun armyAuditing(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    //军团分享
    @FormUrlEncoded
    @POST("/army/share")
    fun armyShare(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ShareBean?>?>

    //等级设置页
    @FormUrlEncoded
    @POST("/army/gradeSet")
    fun armyGradeSet(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<List<ArmyGrade>?>?>

    //等级设置 军团长 页
    @FormUrlEncoded
    @POST("/army/appointIndex")
    fun armyAppointIndex(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyCurrentMember?>?>

    //任命成员列表军团
    @FormUrlEncoded
    @POST("/army/appointList")
    fun armyAppointList(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyMember?>?>

    //任命成员
    @FormUrlEncoded
    @POST("/army/appoint")
    fun armyAppoint(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    //创建军团首页
    @FormUrlEncoded
    @POST("/army/createArmyIndex")
    fun armyCreateArmyIndex(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyCreateInfo?>?>

    //创建军团
    @FormUrlEncoded
    @POST("/army/createArmy")
    fun createArmy(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    //编辑军团公告
    @FormUrlEncoded
    @POST("/army/editNotice")
    fun editNotice(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<Any?>?>

    //军团升级
    @FormUrlEncoded
    @POST("/army/upgrade")
    fun armyUpgrade(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyUpgrade?>?>

    //军团勋章
    @FormUrlEncoded
    @POST("/army/honour")
    fun armyHonour(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<ArmyHonour?>?>

    //游戏猜你喜欢
    @FormUrlEncoded
    @POST("/game/like")//http://api.micaiying.com/game/rankList
    fun gameLike(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<List<GameCenterEntity>?>?>

    //游戏猜你喜欢
    @FormUrlEncoded
    @POST("/game/classList")//http://api.micaiying.com/game/classList?page=1&type=1
    fun gameClassList(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<List<GameContent>?>?>
    //激励视频 添加金币
    @FormUrlEncoded
    @POST("/taskcenter/videoGold")//http://api.micaiying.com/game/classList?page=1&type=1
    fun videoGold(@FieldMap map: ArrayMap<String, Any>?): Observable<BaseBean<SignGold?>?>

}